package com.da.javatest.leetCode;

import java.util.HashSet;
import java.util.Set;

/**
 * @author chenlida
 * @date 2019/1/19 11:37
 * @description
 */
public class Code217 {
    public boolean containsDuplicate(int[] nums) {
        Set<Integer> set = new HashSet<>();
        for (int num : nums) {
            set.add(num);
        }
        return !(set.size() == nums.length);
    }
}
